import requests


class HtmlDownloader(object):

    def download(self, url):
        if url is None:
            return

        response = requests.get(url)

        if response.status_code != 200:
            return None

        return response.text

    def get_post_response(self, url, post_data):
        if url is None:
            return

        response = requests.post(url, data=post_data)

        if response.status_code != 200:
            return None

        return response.text

